package com.zjj.springstu.use.coreConcept.beanDefinitionReader;

import com.zjj.springstu.use.coreConcept.config.AppConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;

/**
 * @author zhanglei.zjj
 * @description 测试 ClassPathBeanDefinitionScanner
 * @date 2023/4/15 11:03
 */
public class TestClassPathBeanDefinitionScanner {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
        ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(context);
        scanner.scan("com.zjj.springstu.use.coreConcept.service");

        System.out.println(context.getBean("user"));

    }
}
